package com.power200.android.service;

import android.os.Environment;

import java.io.File;

/**
 * Created by liuming on 10/11/15.
 */
public class FileService {

    public File openFile(String path) {
        File file = null;
        if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
            // sdcard
            file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + path);
        } else {
            // /
            file = new File(path);
        }
        return file;
    }
}
